package com.qf.mapper;

import com.qf.pojo.TbUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/1 17:40
 */
public interface UserMapper {
    TbUser findByUserId(Long uid);
    TbUser findByUsernameAndPassword(String username,String password);
    TbUser findByUsernameAndPasswordAnno(@Param("username") String username,@Param("pwd") String password);

    TbUser findByUsernameAndPasswordMap(Map map);

    TbUser findByUsernameAndPasswordMapAnno(@Param("paramMap") Map map);


    List<TbUser> findByUsernameLike(String like);

    int deleteById(Long id);

    int updateEmailById(@Param("email") String email,@Param("id") Long id);

    int addUser(TbUser tbUser);

    //添加用户后获取主键
    int addUserGetId(TbUser tbUser);
}
